<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--<script>-->
    <!--var str = '<ul class="attr"> <li> <a href="www.baidu.com">百度baidu</a> <a href=\'www.tecent.com\'>腾讯tengxun</a> <a href="www.alibaba.com">阿里巴巴alibaba</a> </li> </ul>';-->

    <!--var reg = /href=['"](.+?)['"]>(.+?)</g;-->
    <!--var r;-->
    <!--var m = new Array();-->

    <!--while (r = reg.exec(str)) {-->
        <!--m[r[1]] = r[2];-->
    <!--}-->
    <!--console.log(m);-->
<!--</script>-->
</body>